package com.hqd.ch03.v11.spel.standard;

/**
 * token类型
 */
public enum TokenKind {
    LITERAL_INT,

    LITERAL_REAL,

    LITERAL_STRING,

    LPAREN("("),

    RPAREN(")"),

    COMMA(","),

    DOT("."),

    IDENTIFIER,

    PLUS("+"),

    STAR("*"),

    MINUS("-"),

    DIV("/"),

    GE(">="),

    GT(">"),

    LE("<="),

    LT("<"),

    EQ("=="),

    NE("!="),

    MOD("%"),

    NOT("!"),

    ASSIGN("="),

    FACTORY_BEAN_REF("&"),

    SYMBOLIC_OR("||"),

    SYMBOLIC_AND("&&"),

    INC("++"),

    DEC("--");
    final char[] tokenChars;

    private TokenKind(String tokenString) {
        this.tokenChars = tokenString.toCharArray();
    }

    private TokenKind() {
        this("");
    }

    public int getLength() {
        return this.tokenChars.length;
    }
}
